package cn.com.dingtek.genius.manager.server.repository.db.manager;

import cn.com.dingtek.genius.manager.server.repository.db.entity.AuthGroupRule;
import cn.com.dingtek.genius.manager.server.repository.db.mapper.AuthGroupRuleMapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

@Service
public class AuthGroupRuleManager extends ServiceImpl<AuthGroupRuleMapper, AuthGroupRule> {
    public AuthGroupRule getAuthGroupRule(Long groupId, Long ruleId) {
        return getOne(Wrappers.<AuthGroupRule>query().eq("group_id", groupId).eq("rule_id", ruleId));
    }
}
